package com.ruoyi.system.domain;

import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * 备件库存管理对象 spare_parts_inventory
 *
 * @author ruoyi
 * @date 2025-03-19
 */
public class SparePartsInventory extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 备件唯一编号（规则：SP+年月+3位序列号）
     */
    private String partNo;

    /**
     * 备件完整名称
     */
    @Excel(name = "备件完整名称")
    private String partName;

    /**
     * 适用设备清单（JSON格式）
     */
    @Excel(name = "适用设备清单", readConverterExp = "J=SON格式")
    private String applicableDevices;

    /**
     * 当前库存数量
     */
    private Long stockQuantity;

    public void setPartNo(String partNo) {
        this.partNo = partNo;
    }

    public String getPartNo() {
        return partNo;
    }

    public void setPartName(String partName) {
        this.partName = partName;
    }

    public String getPartName() {
        return partName;
    }

    public void setApplicableDevices(String applicableDevices) {
        this.applicableDevices = applicableDevices;
    }

    public String getApplicableDevices() {
        return applicableDevices;
    }

    public void setStockQuantity(Long stockQuantity) {
        this.stockQuantity = stockQuantity;
    }

    public Long getStockQuantity() {
        return stockQuantity;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("partNo", getPartNo())
                .append("partName", getPartName())
                .append("applicableDevices", getApplicableDevices())
                .append("stockQuantity", getStockQuantity())
                .append("remark", getRemark())
                .append("updateTime", getUpdateTime())
                .append("updateBy", getUpdateBy())
                .append("createTime", getCreateTime())
                .append("createBy", getCreateBy())
                .toString();
    }
}
